1. Field of the Invention
The present invention relates to a new and improved method and apparatus for reading and rendering texture data for use with a texture mapping technique that substantially improves expression in a three-dimensional computer graphics system. In particular, the present invention can be applied for a variety of fields such as CAD (Computer Aided Designing) systems and game machines.
2. Description of the Related Art
Texture mapping is used to place texture data such as pattern or natural images on an object in computer graphics. This object is typically formed using a plurality of polygons, such as a triangle polygon or a square polygon. Therefore, by using texture mapping, a realistic picture can be generated. For example, consider the state wherein an object in square form mapped texture data is rotating. As mentioned above, since generally an object is formed from a plurality of polygons such as triangles, texture data is mapped as each polygon unit. With respect to such texture data mapping, the texture data is stored in a memory beforehand, and the texture mapping is performed by reading texture data from the memory in accordance with calculated memory addressing.
An example of a conventional texture mapping operation is as follows:
1) Texture coordinates (S1, T1, Q1), (S2, T2, Q2), and (S3, T3, Q3) are designated to vertexes of a triangle. PA1 2) By linearly interpolating the texture coordinates of the vertexes of the triangle, texture coordinates (S, T, Q) of an inner point of the triangle are obtained. PA1 3) By performing dividing operations of U S/Q and V=T/Q, a memory address (U, V) is obtained. PA1 4) Texture data is then read from the memory with the memory address obtained in step 3 and is placed on the triangle.
In a conventional computer graphics system, texture data is mapped in such a manner that a texture data reading apparatus reads texture data from a conventional memory. However, since the read speed of texture data from the memory is not satisfactorily high, the performance of the texture mapping apparatus is restricted.
To solve such a problem, a cache unit that temporarily stores texture data may be disposed between the texture data reading apparatus and the memory. In this case, the data reading apparatus can read texture data from the cache unit at high speed.
In such a structure, when the size of texture data is smaller than the storage capacity of the cache unit, the texture data can be read at high speed. However, when the size of the texture data is larger than the storage capacity of the cache unit, to change texture data in the cache unit, texture data should be read from the memory and then written to the cache unit. Thus, the cache unit does not effectively work as a means for sending capture data at high speed.
In addition, since the circuit scale of the cache unit is large, when it is used, a small scale texture mapping unit cannot be accomplished.
Accordingly, there has been a long existing need for improved methods and apparatus for texture data reading and rendering which obviates the aforedescribed difficulties encountered with systems heretofore available. The present invention clearly fulfills this need.